<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<style>
#output tr{
	height:20pt;
	text-align:center;
}
.outputHeder{
	background: #6dfff2;
}
</style>

<script type="text/javascript" src="../js/jquery-1.10.2.js"></script>
<script type="text/javascript">

$(document).ready(function(){
	$("select[name=way] option[value="+'${way}'+"]").attr("selected",true);
});

function fn_Serch(){
	var way = document.getElementById("way").value; 
	location.href="adminWayList.do?way="+way;
}

</script>

<table align="center" border="0" cellpadding="0" cellspacing="1" bgcolor="#a0a0a0" width="1000">
<div style="text-align:center">
배송상태&nbsp;&nbsp; : &nbsp;&nbsp;
	<select id="way" name="way" onchange="fn_Serch()">
		<option value="" selected="selected">전체목록</option>
		<option value="미배송">미배송</option>
		<option value="배송완료">배송완료</option>
	</select>
</div>
<br/>
	<table id="output" align="center" width="750" border="0" cellpadding="0" cellspacing="0">
		<tr class="outputHeder">
			<td>주문코드</td>
			<td>구매자</td>
			<td width="200">주소</td>
			<td>전화번호</td>
			<td>배송상태</td>
		</tr>
		
		<c:if test="${count==0 }">
			<tr>
				<td colspan="11" align="center">주문하신 내역이 없습니다.</td>
			</tr>
		</c:if>
		
		<c:forEach var="list" items="${orderList }">
		<tr>
			<c:if test="${list.b_code == list.b_code }">
			<td><a href="adminWayDetail.do?b_code=${list.b_code }" >${list.b_code }</a></td>
			<td>${list.memberCommand.m_name }</td>
			<td width="150">${list.memberCommand.m_address }</td>
			<td>${list.memberCommand.m_phone }</td>
			<td>${list.b_way }</td>
			</c:if>
		</tr>
		</c:forEach>
		
		<tr>
			<td align="center" colspan="12">${pagingHtml }</td>
		</tr>
		
	</table>
</table>

